1. Technical Field
The present invention relates to an optical sensor that executes predetermined recognition processing by imaging an object to be recognized with a camera, executing two-dimensional or three-dimensional measurement processing using the generated image, and matching the obtained feature data with previously registered model data. More particularly, the present invention relates to processing for registering the model data used in the above recognition processing to the optical sensor.
2. Related Art
For example, Japanese Patent No. 2961264 discloses a method for generating three-dimensional model data of an outline of an object.
In the invention of this Japanese Patent No. 2961264, three-dimensional information is assumed to be reconstructed by stereoscopic measurement, and an actual model of an object is measured multiple times while the measuring direction is changed in each of the measurement operations. Then, the three-dimensional information reconstructed by each of the measurement operations is matched with each other and is positioned, so that model data that can be measured in various directions are generated by combining the positioned information.
Japanese Patent No. 2961264 and “Stereo Correspondence Using Segment Connectivity”, Transactions of Information Processing Society of Japan, Vol. 40, No. 8, pages 3219 to 3229, published on August 1999, disclose “segment-based stereo” as a method for reconstructing three-dimensional information of the outline of an object. In this method, edges included in images constituting a stereoscopic image are divided into segments of lines and curved lines based on connection points and branching points, and stereo-supported search is performed in units of segments, so that a predetermined number of three-dimensional coordinates are calculated.
A process for registering model data to an optical sensor generally includes the steps of providing a recognition-target object having a shape preferable for the registration-target optical sensor, actually executing imaging and measurement, and generating model data based on feature data obtained from measurement. In addition, experimental recognition is performed using the generated model data in order to ensure adequate accuracy in recognition, and the model data are corrected based on the recognition result. If the accuracy is extremely poor, for example, model data are generated all over again as necessary. As a result, it takes much labor and time to determine model data to be registered.
As described above, operation for registering models to an optical sensor is a heavy burden. Accordingly, engineers working at a site with a plurality of production lines executing the same step demand that model data registered to an optical sensor arranged on one of these lines can be exported to an optical sensor arranged on another line. However, in reality, illumination condition may be different depending on the line, there may be a line that is affected by external light, and uneven characteristics of cameras may result in generating images having different contrasts. Therefore, the state of an image generated by each optical sensor varies, which makes it difficult to register the same model data to each of the optical sensors.
On the other hand, in a case where model data are generated for each of the optical sensors, and model data are generated by different workers depending on the sensor, there may be a possibility that the contents set in the model data may vary depending on the worker, and the unevenness of the model data may result in unevenness in the stability of the processing carried out in each of the lines.
With regard to the above issues, the inventors have considered converting design data such as CAD data into a data format suitable for measurement to automatically generate model data that are not affected by the difference of measurement conditions and installation conditions of the sensors and importing the thus generated model data into each of the optical sensors. However, the model data derived from the design data include information beyond the measurable range of the optical sensors. As a result, when the measurement result is matched, the model data are found to include a large volume of information that is not associated with the measurement result, thus reducing the degree of consistency instead of increasing it.